package dao;

public class Player {
    private String PlayerName;
    private String password;
    private int Score;
    public Player(String PlayerName, String password)
    {
        this.PlayerName=PlayerName;
        this.password=password;
        this.Score=0;
    }
    public String getPlayerName() {
        return PlayerName;
    }

    public void setPlayerName(String playerName) {
        PlayerName = playerName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getScore() {
        return Score;
    }

    public void setScore(int score) {
        Score = score;
    }

    @Override
    public String toString() {
        return "Player{" +
                "PlayerName='" + PlayerName + '\'' +
                ", password='" + password + '\'' +
                ", Score=" + Score +
                '}';
    }
    public static  boolean check(String playerName,String password)
    {
        if(password==null||playerName==null) return false;
        if(password.equals("")||playerName.equals("")) return  false;
        char ch1=playerName.charAt(0);
        char ch2=password.charAt(0);
        if(ch1==' '||ch2==' ')  return false;
        return true;

    }
}
